import React from 'react';
import { useParams, Link } from 'react-router-dom';

const Detail: React.FC = () => {
  const { id } = useParams<{ id: string }>();
  return (
    <div className="p-8">
      <h1 className="text-2xl font-bold mb-4">详情页</h1>
      <p>当前商品ID: <span className="font-mono text-lg">{id}</span></p>
      <Link to="/list" className="text-blue-500 underline mt-4 block">返回列表页</Link>
    </div>
  );
};

export default Detail;
